This invention relates to an image compression system and to a method of determining quantisation parameters for such a system.
In a typical transform-based image compression system, an input image is first decomposed by a transform to provide transform coefficient data, which data is then quantised and then coded for onward transmission or storage. In the decoding process, the coded data must be requantised and inverse transformed to reconstruct the original image. However, when the image compression system is run on a device with limited auxiliary memory, it is often impossible to load the whole image into memory. In such cases, the transform can be performed on a sequence of blocks comprising the entire image. Although the memory constraint is resolved by using the transform in a block by-block fashion, the quality of the compressed images is substantially degraded.
Many of the currently available image compression systems are based on a discrete cosine transform (DCT). Another transform used in such systems is the wavelet transform. Although DCT can be performed in a block-by-block fashion the nature of the DCT coefficients differs from that of the wavelet ones, so that the DCT based solutions are not generally applicable to wavelet-based image compression systems.
As described in US Pat. Nos. 4,677,479 (Hatori) and U.S. Pat. No. 5,396,567 (Jass), in order to improve further the compression factor of the system, the quantization parameters can be dynamically adjusted based on an activity value of the block. The activity value is an indication of how much the image in the block has changed and is generally determined by a statistical analysis of the picture elements (pixels) in the block.
In the former patent mentioned above, a parameter such as a variance or a mean value of picture element values in a region to be requantised is calculated on the basis of sub-sampled picture element values and, according to this parameter, a quantiser""s parameters are adaptively varied for each region.
However, the system disclosed in this patent calculates the parameter based on pixel values and requires multiple passes (requantisation). In the latter patent mentioned above, each image block is subdivided into subregions and the activity value is determined for each subregion from the pixel values in the subregion. A subregion parameter is then calculated for each subregion from the activity value and a block parameter is determined by summing the subregion parameters. However, this system only relates to DCT transform systems.
The known image compression systems require the same bit rate to be used to code each of the image blocks. When the quantisation parameters are being dynamically adjusted for each block, the number of bits necessary for coding each image block changes. Thus, in order to maintain the desired bit rate on a block-by-block basis, the system is often run several times over the same block. This is known as multi-pass and, although it provides the desired bit rate, it is computationally expensive and takes longer to encode the image. This is clearly undesirable, especially for portable, power-limited devices.
Furthermore, setting a desired bit rate to be equal for all the blocks does not take into account the non-homogeneity of the image data and, as a result, leads to non-optimal image coding. Consequently, the quality of the compressed image is degraded.
The present invention therefore seeks to provide an image compression system and to a method of determining quantisation parameters for such a system which overcomes, or at least reduces the above-mentioned problems of the prior art.
Accordingly, in one aspect, the invention provides an image compression system comprising:
a wavelet transform module having an input and an output, the input being coupled to an input terminal of the image compression system for receiving image data in the form of image blocks and the output providing wavelet transform coefficients for each image block;
a quantisation module having an input and an output, the input being coupled to the output of the wavelet transform module and the output providing quantised wavelet transform coefficients for each image block;
a coding module having an input and an output, the input being coupled to the output of the quantisation module and the output being coupled to an output terminal of the image compression system for providing compressed image data comprising coded quantised wavelet transform coefficients for each image block;
an activity value generator having an input and an output, the input being coupled to the output of the wavelet transform module; and
a quantisation control module having first and second inputs and an output, the first input being coupled to the output of the activity value generator, the second input being coupled to receive a required quantisation rate, and the output being coupled to a control input of the quantisation module,
wherein the activity value generator generates activity values representing a statistical analysis of the wavelet transform coefficients, the activity values being provided at the output of the activity value generator.
In a second aspect, the invention provides a method of determining quantisation parameters for an image compression system, the method comprising the steps of:
receiving wavelet transform coefficients for each of a plurality of image blocks making up an image;
determining an activity value based on statistical analysis of the wavelet transform coefficients for a current image block;
determining quantisation parameters for the current image block based the activity value and a required quantisation rate.